<?php
require_once('flickr.php');
require_once('vocabulary.php');

function query($query_term = null, FlickR $flickr)
{
    foreach (vocabulary::$colors as $color_term) {
        $query_stat = $query_term . ',' . $color_term;
        $num = $flickr->search($query_stat);
        echo $query_stat . " : " . $num . "<br>";
    }

    echo "<br>";

    foreach (vocabulary::$emotions as $emotion_term) {
        $query_stat = $query_term . ',' . $emotion_term;
        $num = $flickr->search($query_stat);
        echo $query_stat . " : " . $num . "<br>";
    }

}


// Example to use the defined functions :
$Flickr = new FlickR;

query('paris', $Flickr);

?>
